#ifndef PLUGINSLIST_H
#define PLUGINSLIST_H
//
#include <QtCore>
#include "PluginsInterface.h"
class SelectPluginButton;




class pluginsList : public QObject
{
	Q_OBJECT
private slots:
	void reSelectPlugin(const bool checked, uploadPluginClass *plugin);
	void retranslatePlugins();
signals:
	void setIcon(const QIcon &icon);
	void addPluginRow(const QStringList &list);
//	void addPluginWidget(QWidget* widget);
	void addPluginButton(SelectPluginButton *button);
	void addSettingsTab(QWidget* tab, const QIcon &icon, const QString &label);
public:
	pluginsList(QObject *parent, QSettings *Config, addImagePluginStratum *addImageStratum );

	inline void setAddImageStratum(addImagePluginStratum* value) { addImageStratum = value; }
	addImagePluginStratum* getAddImageStratum() const { return addImageStratum; }
	bool loadPlugins();
	void setCurrentPlugin(uploadPluginClass* value) { currentPlugin = value; }
	uploadPluginClass* getCurrentPlugin() const { return currentPlugin; }
	inline int countOfUploadPlugins() const {return this->uploadPlugins.count();}
	inline int countOfAddImagePlugins() const {return this->addImagePlugins.count();}

private:
	addImagePluginStratum* addImageStratum;
	QStringList pluginFileNames;
	bool loadUploadPlugin(uploadPluginClass *plugin);
	bool loadAddImagePlugin(addImagePluginClass *plugin);
	uploadPluginClass* currentPlugin;
	QList<uploadPluginClass*> uploadPlugins;
	QList<addImagePluginClass*> addImagePlugins;
	QSettings *Config;
};
#endif
